import java.io.*;
import java.util.*;

/**
 * Creat with IntelliJ IDEA
 * Description:数据结构 顺序表
 * User:WZW
 * Date:2022-09-05
 * Time:14:47
 */



public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        int num = scanner.nextInt();
        if (num == 0) return;
        for (int i = 0; i < num; i++) {
            list.add(scanner.nextInt());
        }

        list.sort(Comparator.naturalOrder());
        //[0, 2, 2, 2, 5, 5, 7, 10]
        int n = 1;
        int i = 0;
        while (i < num - 1) {
            if (list.get(i) == list.get(i + 1)) {
                n++;
            } else {
                System.out.println(list.get(i) + ":" + n);
                n = 1;
            }
            i++;
        }
        System.out.println(list.get(i) + ":" + n);
    }
}
